<template>
<div>
<ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="item in news" :key="item.src">
					<router-link :to="'/xinwen/xinwenxiangqing/'+item.id">
						<img class="mui-media-object mui-pull-left" :src=item.src>
						<div class="mui-media-body">
							<div class="newsTitle">
							{{item.title}}
							</div>
							<p class='mui-ellipsis'><span>{{item.source}}</span><span>{{item.sourcetime}}</span></p>
						</div>
					</router-link>
				</li>
</ul>
</div>
</template>
<script>
import mui from '../mui.min.js'  
export default{
	name:'xinwen',
	data(){
	return({
	id:1,
	news:[]
	})
	},
	methods:{
	
	},
	created(){
	this.$http.get("http://127.0.0.1:5000/news").then(response =>this.news = response.data).catch(this.news = [0,1]);
	}
	
}


</script>
<style>
.newsTitle{
	overflow:hidden;
	white-space:nowrap;
	text-overflow:ellipsis;
}
.mui-ellipsis{
	display:flex;
	justify-content:space-between;
	color:blue;
}
</style>